import request from '@/utils/request'

// 创建生产管理农事
export function createHusbandry(data) {
  return request({
    url: '/produce/husbandry/create',
    method: 'post',
    data: data
  })
}

// 更新生产管理农事
export function updateHusbandry(data) {
  return request({
    url: '/produce/husbandry/update',
    method: 'put',
    data: data
  })
}

// 删除生产管理农事
export function deleteHusbandry(id) {
  return request({
    url: '/produce/husbandry/delete?id=' + id,
    method: 'delete'
  })
}

// 获得生产管理农事
export function getHusbandry(id) {
  return request({
    url: '/produce/husbandry/get?id=' + id,
    method: 'get'
  })
}

// 获得生产管理农事列表
export function getHusbandryListByInfoId(id) {
  return request({
    url: '/produce/husbandry/list-infoId?infoId=' + id,
    method: 'get'
  })
}



// 获得生产管理农事分页
export function getHusbandryPage(query) {
  return request({
    url: '/produce/husbandry/page',
    method: 'get',
    params: query
  })
}

// 导出生产管理农事 Excel
export function exportHusbandryExcel(query) {
  return request({
    url: '/produce/husbandry/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
